package com.xz.courseschedule.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.License;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Swagger配置类
 * @Author: zys
 * @CreateTime: 2025-06-03
 */
@Configuration
public class SwaggerConfig {

    @Bean
    public OpenAPI customOpenAPI() {
        return new OpenAPI()
                .info(new Info()
                        .title("高校排课系统API文档")
                        .description("基于遗传算法的高校排课系统接口文档")
                        .version("v1.0.0")
                        .contact(new Contact()
                                .name("周同学")
                                .email("2074553018@qq.com")
                                .url("https://gitee.com/lucky-xz/course_schedule"))
                        .license(new License()
                                .name("MIT License")
                                .url("https://opensource.org/licenses/MIT")));
    }
}